package com.mapResult.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 物流记录对象 bus_logistics_summary
 *
 * @author chenming
 * @date 2022-09-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BusLogisticsSummary {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long parentId;

    /**
     * 驾驶员名称
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String driverName;

    /**
     * 物流状态
     */
    private Integer logisticsStatus;

    /**
     * 物流状态查询列表（ in 中使用）
     */
    @TableField(exist = false)
    private List<Integer> logisticsStatusList;

    /**
     * 车牌号
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String carNum;

    /**
     * 物流名称
     */
    private String logisticsDescription;

    /**
     * 是否开启子任务
     */
    @TableField(exist = false)
    private boolean subLogistic;

    /**
     * 物流规格
     */
    private String logisticsSpecifications;

    /**
     * 物流单位
     */
    private String logisticsUnit;

    /**
     * 用车时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date useCarDate;

    /**
     * 物流发起人
     */
    private Long logisticsInitiatorId;

    /**
     * 物流发起人名称
     */
    @TableField(exist = false)
    private String logisticsInitiatorName;

    /**
     * 物流发起人所属部门
     */
    private Long logisticsInitiateDeptId;

    /**
     * 物流发起人所属部门
     */
    @TableField(exist = false)
    private String logisticsInitiateDeptName;

    /**
     * 联系电话
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long contactPhone;

    /**
     * 物流编号
     */
    private String logisticsNumber;

    /**
     * 物流创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date logisticsCreateDate;

    /**
     * 审批人
     */
    private Long approveId;

    /**
     * 审批人
     */
    @TableField(exist = false)
    private String approveName;

    /**
     * 物流审批状态
     */
    private Integer approveStatus;

    /**
     * 物流审批状态列表（ in 中使用）
     */
    @TableField(exist = false)
    private List<Integer> approveStatusList;

    /**
     * 物流开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date logisticsStartDate;

    /**
     * 物流结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date logisticsEndDate;

    /**
     * 物流途经点
     */
    private String wayPoint;

    /**
     * 物流备注
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String remark;

    /**
     * 物流审批意见
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String approveOpinion;

    /**
     * 当开启子任务的时候添加至此
     */
    @TableField(exist = false)
    private List<BusLogisticsSummary> subLogistics;
}
